package com.ahm.feign;

import com.ahm.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @author anhaimeng
 * @title: ProductService
 * @projectName feign-demo
 * @description: TODO
 * @date 2021/10/1917:52
 */
@FeignClient("service-provider")
public interface ProductService {


    @GetMapping("/product/list")
    List<Product> selectAllProduct();


    @GetMapping("/product/{id}")
    Product selectProductById(@PathVariable Integer id);

    @PostMapping("/product/save")
    Map<String,Object> save(Product product);

    @GetMapping("/product/getProduct")
    Product getProduct(Product product);



}
